package com.int_tech.facility.dao;

import com.int_tech.car.entity.Car;
import com.int_tech.facility.entity.Facility;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by Administrator on 2017/9/25.
 */
public interface FacilityDao extends JpaRepository<Facility,Integer> {

    List<Facility> findAllByIsDel(int isDel);

    List<Car> findFacilityByIsDel(Pageable pageable,int isDel);

    Facility findFacilityByFacilityNumberAndIsDel(String facilityNumber,int isDel);

    Facility findFacilityByCarNumberAndIsDel(String carNumber,int isDel);

    Page<Facility> findByIsDel(Pageable pageable,int isDel);

    Facility findByFacilityNumberAndIsDel(String facilityNumber,int isDel);
}
